It may look like a stupid question, but I went through various pages since 2 days, and didn't get to a solution by myself. So I made a session variable like this:
<?php session_start(); $_SESSION['currentpage']="home";?>
(I checked, it does make the variable and assign it right.)
Then I tried to use it as a parameter here:
<body onload="changepage($_SESSION['currentpage'])">
It doesn't pass the variable. I tried to put it into directly the function, like not as a parameter, but inside it, doesn't work.
Jayden Bell
01-Nov-2014You are missing the PHP tags:
<a onclick="window.open('../../Process.aspx','cal','width=490,height=420,left=500,top=180,scrollbars=no')"
href="javascript:;"><img alt="Process" src="../../images/register.gif" style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" id="IMG1" onclick="return IMG1_onclick()" /></a>
<script type="text/javascript" src="../../NoPostBacks.js">
function IMG1_onclick() {
Session("Amount") = Me.txtAmount.Text
Session("Zip") =Me.txtZip.Text
}
</script> - See more at: http://codeverge.com/asp.net.state-management/how-can-i-set-session-variables-with/307701#sthash.c0pM4q7S.dpuf